package com.qy139.auth.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qy139.auth.service.IUserLeaveService;
import com.qy139.entity.TabUser;
import com.qy139.entity.UserLeave;
import com.qy139.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yuhaochen
 * @since 2021-12-11
 */
@RestController
@RequestMapping("/user-leave")
public class UserLeaveController {
    @Resource
    private IUserLeaveService userLeaveService;

    @GetMapping("/findAllLeave")
    public Result findAllLeave(Page<UserLeave> page, TabUser user){
        IPage page1 = userLeaveService.selectAllLeave(page,user);
        return new Result(page1);
    }

}

